<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
    <div th:replace="blog/luna/header::head-fragment"></div>
    <body>
        <div th:replace="blog/luna/header::header-fragment"></div>
        <div class="content">
            <section class="jumbotron geopattern">
                <div class="container">
                    <div id="jumbotron-meta-info">
                        <h1>文章列表</h1>
                        <br>
                        <span class="meta-info">
                            <span class="mega-octicon octicon-list-unordered">
                                &nbsp;&nbsp;<th:block th:text="${pageName}+'页：'+${keyword}"/>
                            </span>
                        </span>
                    </div>
                </div>
            </section>

            <article class="post container">
                <div class="row">
                    <div class="col-md-10">
                        <ul id="posts-list">
                            <th:block th:if="${null != blogPageResult}">
                                <th:block th:if="${blogPageResult.list.size==0}">
                                    <li class="posts-list-item">
                                        <div class="posts-content">
                                            <a class="posts-list-name bubble-float-left">未找到您要的内容</a>
                                        </div>
                                    </li>
                                </th:block>
                                <th:block th:each="blog,iterStat:${blogPageResult.list}">
                                    <li class="posts-list-item">
                                        <div class="posts-content">
                                    <span class="posts-list-meta"
                                          th:text="${#dates.format(blog.createTime, 'yyyy-MM-dd')}"></span>
                                            <a class="posts-list-name bubble-float-left"
                                               th:href="@{'/blog/' + ${blog.blogId}}">
                                                <th:block th:text="${blog.blogTitle}"/>
                                            </a>
                                            <span class="circle"></span>
                                        </div>
                                    </li>
                                </th:block>
                            </th:block>
                        </ul>

                        <br/>
                        <th:block th:if="${blogPageResult.pages > 1}">
                            <div style="text-align: center">
                                <div id="pagination" class="pagination">
                                    <input id="total" type="hidden" th:value="${blogPageResult.total}"/>
                                    <input id="pageSize" type="hidden" th:value="${blogPageResult.pageSize}"/>
                                    <input id="pageNum" type="hidden" th:value="${blogPageResult.pageNum - 1}"/>
                                    <input id="target" type="hidden" th:value="${prefix}+${keyword}+'/'"/>
                                </div>
                            </div>
                        </th:block>
                    </div>
                </div>
            </article>
        </div>
        <div th:replace="blog/luna/footer::footer-fragment"></div>
    </body>
    <script th:src="@{/blog/luna/js/pagination.js}"></script>
    <script th:src="@{/blog/luna/js/search.js}"></script>
</html>